From: Robert Mader Date: Mon, 4 Mar 2019 15:31:20 +0000 (+0100) Subject: na-tray-child: Silence gdk_window_set_background_pattern warnings X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~888^2^2~22 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1b3c26364b6a073131615aa96afc59a33fb997fa;p=gnome-shell.git na-tray-child: Silence gdk_window_set_background_pattern warnings Apparently we can't get rid of them without breaking backward compatibility. So let's stick to how GTK handles it and just silence the warnings. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/423 --- diff --git a/src/tray/na-tray-child.c b/src/tray/na-tray-child.c index 6664757d7..944c79944 100644 --- a/src/tray/na-tray-child.c +++ b/src/tray/na-tray-child.c @@ -52,7 +52,9 @@ na_tray_child_realize (GtkWidget *widget) /* Set a transparent background */ cairo_pattern_t *transparent = cairo_pattern_create_rgba (0, 0, 0, 0); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gdk_window_set_background_pattern (window, transparent); +G_GNUC_END_IGNORE_DEPRECATIONS cairo_pattern_destroy (transparent); child->parent_relative_bg = FALSE; @@ -61,7 +63,9 @@ na_tray_child_realize (GtkWidget *widget) { /* Otherwise, if the visual matches the visual of the parent window, we * can use a parent-relative background and fake transparency. */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gdk_window_set_background_pattern (window, NULL); +G_GNUC_END_IGNORE_DEPRECATIONS child->parent_relative_bg = TRUE; }